﻿using System;
using System.Linq;

namespace FBGraph.ClientGenerator.CodeGen
{
    public class MethodList : CodeGenObjectList<Method>
    {
        public MethodList(params Method[] methods)
            : base(2, methods) { }

        public void Suggest(Method method)
        {
            if (!this.Any(ctr => method.Name == ctr.Name && ctr.Parameters.SequenceEqual(method.Parameters)))
            {
                this.Add(method);
            }
        }
    }
}